 <{extends file="<{$tempdir}>/public/wxsite.html"}>  
<{block name=extendcss}> 
 <link rel="stylesheet"  href="<{$siteurl}>/templates/<{$tempdir}>/public/wxsite/css/editaddress.css">   

<{/block}>
 <{block name=extendjs}>  
   <script src="<{$siteurl}>/templates/<{$tempdir}>/public/wxsite/js/template.min.js"></script>    
<{/block}>
<{block name=myScrolljs}>
<script> 
		var myScroll;
function loaded() {
	myScroll = new iScroll('wrapper', {
		useTransform: false,
		onBeforeScrollStart: function (e) {
			var target = e.target;
			while (target.nodeType != 1) target = target.parentNode;

			if (target.tagName != 'SELECT' && target.tagName != 'INPUT' && target.tagName != 'TEXTAREA')
				e.preventDefault();
		}
	});
}
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false); 
document.addEventListener('DOMContentLoaded', function () { setTimeout(loaded, 200); }, false);
</script>
<{/block}>
<{block name=sitetitle}><{$sitename}><{/block}>
<{block name=hearnav}>
<div class="toptitCon">
 <div class="toptitBox">
  <div class="toptitL"><i></i></div>
  <div class="toptitC"><h3>找回密码</h3></div>
 </div>
</div>
<{/block}>
<{block name=blockcontent}>  
 <div id="wrapper" style="top:40px;">
	<div id="scroller">
		
<div class="sendcode">
 <ul>
  <li><input type="text" placeholder="请输入手机号" id="phone" name="phone" value="" class="sendcodeinp1"></li>
  <li><input type="text" placeholder="请输入验证码" id="pwdyzm" name="pwdyzm" class="sendcodeinp2"><input type="button"   onclick="clickyanzheng();"   time="0" id="dosendbtn"  value="获取验证码" class="sendcodeinp3"></li>
  </ul>
</div>
<div class="intexchabutt"><input type="button" value="下一步" id="nextzhpwd" onclick="nextzhpwd();" datauid="0" class="intexbg1"></div>
  <div style="height:10px;"></div>
</div>		 
</div>		
<script>
	 
	 function nextzhpwd(){
		
		var datauid = $("#nextzhpwd").attr('datauid');
		
		  $('#loading').show();
		 
		url = siteurl+'/index.php?ctrl=wxsite&action=fornextzhpwd&datatype=json&random=@random@';
     	  url = url.replace('@random@', 1+Math.round(Math.random()*1000));
        $.ajax({         //script定义
                 url: url.replace('@random@', 1+Math.round(Math.random()*1000)),
                 dataType: "json",
                 async:true,
                 data:{'phone':$("#phone").val(),'pwdyzm':$("#pwdyzm").val(),'datauid':datauid},
                 success:function(content) { 
                 	if(content.error ==  false){
					 
						
							Tmsg('验证成功,请重新设置密码！');
							$('.closegb').live("click", function() {   
								 $('.popup').slideToggle('slow',function(){$('#mask').remove();$('.popup').remove();}); 
								  window.location.href=  siteurl+'/index.php?ctrl=wxsite&action=forgetnextpwd&id='+content.msg ;
							});
							
						
							
                 	}else{
                 		Tmsg(content.msg);
                 	}
                  	$('#loading').toggle();
                 
                 },
                 error:function(){
                  $('#loading').toggle();
                 }
        }); 
		
		
		
		
		
		
	 
	 }
	 
	</script>

<script>
 var regestercode = '<{$regestercode}>';
 
function noshow(msg){  
    	Tmsg(msg);
}
//获取手机验证码
function clickyanzheng(){ 
 
        var tempurl = siteurl+'/index.php?ctrl=wxsite&action=forgetpwd&random=@random@&phone=@phone@';
   	 	     tempurl = tempurl.replace('@random@', 1+Math.round(Math.random()*1000)).replace('@phone@',$('#phone').val());
	         $.getScript(tempurl);    
	 
}
function showsend(phone,time,uid){  
		$("#nextzhpwd").attr('datauid',uid);
  	    $('input[name="phone"]').val(phone);
        $('#dosendbtn').attr('time',time);
        setTimeout("btntime();",1000);   
} 
 function  btntime(){
  
	   var nowtime = Number($('#dosendbtn').attr('time'));
	   if(nowtime > 0){
	      $('#dosendbtn').attr('disabled',true); 
	      $('#dosendbtn').addClass('seinpbg1');
	      var c = Number(nowtime)-1;
	       $('#dosendbtn').attr('time',c);
	       var  mx = 120-(120 - Number(c));
	        $('#dosendbtn').attr('value','剩余'+mx+'秒');
	         setTimeout("btntime();",1000);
	   }else{
	   	 $('#dosendbtn').attr('disabled',false);
		  $('#dosendbtn').removeClass('seinpbg1');
	   	 $('#dosendbtn').attr('value','重新获取');
     }
  
}
	
	
	

 </script>
<{/block}>